Skip to content

Conversation

steffann
Copy link

@steffann steffann commented Nov 4, 2018

When checking len(value) >= 2 only value[1] is guaranteed to exist

When checking len(value) >= 2 only value[1] is guaranteed to exist
@jrief
Copy link
Owner

jrief commented Nov 6, 2018

what does the value-tuple actually contain? Wouldn't it be safer to check for if len(value) > 2?

@steffann
Copy link
Author

steffann commented Nov 6, 2018

I don't know what it's supposed to contain. I assumed you would know :) It's not a code path I am actually using. I just noticed the discrepancy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants